{block name="title" prepend}Арсенал{/block}
{block name="content"}
<table style="width:760px">
	{foreach $arsenal as $ID => $Element}
	<tr>
		<td rowspan="5" style="width:115px;">
			<a href="#" onclick="return Dialog.info({$ID})">
				<img src="{$dpath}gebaeude/{$ID}.gif" alt="{$LNG.tech.{$ID}}" width="115" height="115">
			</a>
		</td>
		<th colspan="6">
			<a href="#" onclick="return Dialog.info({$ID})"><span style="color:#09F; font-weight:bold; text-decoration:none;">{$LNG.tech.{$ID}}</span></a>
		</th>
	</tr>
    <tr>
		<th style="width:55px;">Апгрейд</th>
        <th>Бонус</th>
        <th colspan="3">На складе</th>
	</tr>
	<tr>
		<td style="text-align:left;">Орудий:</td>
        <td style="text-align:left;">
        	<span style="color:#0C0;">+{$Element.a_bonus|number}</span>
		</td>
        {if $Element.a_level > 0}
        <td style="text-align:left;">
        	Этап <span style="color:#F90;">{$Element.a_level|number}</span>
		</td>
        <td style="text-align:left; width:80px;">
        	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="send" />
                <input type="hidden" name="greid" value="a" />
                <input type="hidden" name="ship" value="{$ID}" />
				<input type="submit" value="Активировать" />
			</form>
		</td>
        <td style="text-align:left; width:50px;">
        	<a class="link" onclick="$('#m{$ID}a').slideToggle();return false" href="#">Продать</a>
		</td>
        {else}
       	<td style="text-align:center;" colspan="2">
        	<span style="color:#F33;">Отсуствует</span>
		</td>
        <td style="text-align:left; width:50px;">
        	<a href="game.php?page=marktup"><span style="color:#F90;">Купить</span></a>
		</td>
        {/if}
	</tr>
    <tr>
		<td style="text-align:left;">Щитов:</td>
        <td style="text-align:left;">
        	<span style="color:#0C0;">+{$Element.s_bonus|number}</span>
		</td>
        {if $Element.s_level > 0}
        <td style="text-align:left;">
        	Этап <span style="color:#F90;">{$Element.s_level|number}</span>
		</td>
        <td style="text-align:left; width:80px;">
        	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="send" />
                <input type="hidden" name="greid" value="s" />
                <input type="hidden" name="ship" value="{$ID}" />
				<input type="submit" value="Активировать" />
			</form>
		</td>
        <td style="text-align:left; width:50px;">
        	<a class="link" onclick="$('#m{$ID}s').slideToggle();return false" href="#">Продать</a>
		</td>
        {else}
        <td style="text-align:center;" colspan="2">
        	<span style="color:#F33;">Отсуствует</span>
		</td>
        <td style="text-align:left; width:50px;">
        	<a href="game.php?page=marktup"><span style="color:#F90;">Купить</span></a>
		</td>
        {/if}
	</tr>
    <tr>
		<td style="text-align:left;">Брони:</td>
        <td style="text-align:left;">
        	<span style="color:#0C0;">+{$Element.d_bonus|number}</span>
		</td>
        {if $Element.d_level > 0}
        <td style="text-align:left;">
        	Этап <span style="color:#F90;">{$Element.d_level}</span>
		</td>
        <td style="text-align:left; width:80px;">
        	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="send" />
                <input type="hidden" name="greid" value="d" />
                <input type="hidden" name="ship" value="{$ID}" />
				<input type="submit" value="Активировать" />
			</form>
		</td>
        <td style="text-align:left; width:50px;">
        	<a class="link" onclick="$('#m{$ID}d').slideToggle();return false" href="#">Продать</a>
		</td>
        {else}
        <td style="text-align:center;" colspan="2">
        	<span style="color:#F33;">Отсуствует</span>
		</td>
        <td style="text-align:left; width:50px;">
        	<a href="game.php?page=marktup"><span style="color:#F90;">Купить</span></a>
		</td>
        {/if}
	</tr>
    <tr>
		<td colspan="7">
        	 <div id="m{$ID}a" style="display: none; clear:both; width:100%;">
             	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="sendpr" />
                <input type="hidden" name="greid" value="a" />
                <input type="hidden" name="ship" value="{$ID}" />
             	<table style="width:100%;">
                	<tr>
                		<th colspan="2">Выставить на прадажу апгрейд орудия (Этап <span style="color:#F90;">{$Element.a_level}</span>) для <span style="color:#09F; font-weight:bold;">"{$LNG.tech.{$ID}}"</span></th>
                    </tr>
                    <tr>
                    	<td>Цена Темной материи (max {(({$ID} - 200) * 10000 * {$Element.a_level})|number})</td>
                    	<td><input id="tm" name="tm" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                   	 	<td>Цена Антиматерии (max {(({$ID} - 200)* 1000 * {$Element.a_level})|number})</td>
                    	<td><input id="am" name="am" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                    	<td colspan="2"><input type="submit" value="Продолжить" /></td>
                    </tr>
                </table>
                </form>
             </div>
             <div id="m{$ID}s" style="display: none; clear:both; width:100%;">
             	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="sendpr" />
                <input type="hidden" name="greid" value="s" />
                <input type="hidden" name="ship" value="{$ID}" />
             	<table style="width:100%;">
                	<tr>
                		<th colspan="2">Выставить на прадажу апгрейд щитов (Этап <span style="color:#F90;">{$Element.s_level}</span>) для <span style="color:#09F; font-weight:bold;">"{$LNG.tech.{$ID}}"</span></th>
                    </tr>
                    <tr>
                    	<td>Цена Темной материи (max {(({$ID} - 200) * 10000 * {$Element.s_level})|number})</td>
                    	<td><input id="tm" name="tm" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                   	 	<td>Цена Антиматерии (max {(({$ID} - 200)* 1000 * {$Element.s_level})|number})</td>
                    	<td><input id="am" name="am" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                    	<td colspan="2"><input type="submit" value="Продолжить" /></td>
                    </tr>
                </table>
                </form>
             </div>
             <div id="m{$ID}d" style="display: none; clear:both; width:100%;">
             	<form action="game.php?page=arsenal" method="post">
				<input type="hidden" name="mode" value="sendpr" />
                <input type="hidden" name="greid" value="d" />
                <input type="hidden" name="ship" value="{$ID}" />
             	<table style="width:100%;">
                	<tr>
                		<th colspan="2">Выставить на прадажу апгрейд брони (Этап <span style="color:#F90;">{$Element.d_level}</span>) для <span style="color:#09F; font-weight:bold;">"{$LNG.tech.{$ID}}"</span></th>
                    </tr>
                    <tr>
                    	<td>Цена Темной материи (max {(({$ID} - 200) * 10000 * {$Element.d_level})|number})</td>
                    	<td><input id="tm" name="tm" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                   	 	<td>Цена Антиматерии (max {(({$ID} - 200)* 1000 * {$Element.d_level})|number})</td>
                    	<td><input id="am" name="am" type="text" value="0" maxlength="8" /></td>
                    </tr>
                    <tr>
                    	<td colspan="2"><input type="submit" value="Продолжить" /></td>
                    </tr>
                </table>
                </form>
             </div>
        </td>
	</tr>
	{/foreach}
</table>
{/block}